VERSION 5.00
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form frmCambiarTipoEmpleado 
   BorderStyle     =   5  'Sizable ToolWindow
   Caption         =   "CAMBIAR TIPO DE EMPLEADO PARA PRODUCCION YA GENERADA"
   ClientHeight    =   1755
   ClientLeft      =   45
   ClientTop       =   315
   ClientWidth     =   8625
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Moveable        =   0   'False
   ScaleHeight     =   1755
   ScaleWidth      =   8625
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton CmdSalir 
      BackColor       =   &H00E0E0E0&
      Caption         =   "&Salir"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   6.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   7680
      Picture         =   "frmCambiarTipoEmpleado.frx":0000
      Style           =   1  'Graphical
      TabIndex        =   5
      Top             =   960
      Width           =   735
   End
   Begin VB.CommandButton CmdGuardar 
      BackColor       =   &H00E0E0E0&
      Caption         =   "&Guardar"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   6.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   6600
      Picture         =   "frmCambiarTipoEmpleado.frx":058A
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   960
      Width           =   735
   End
   Begin MSDataListLib.DataCombo cboEmpleado 
      Bindings        =   "frmCambiarTipoEmpleado.frx":0B14
      Height          =   288
      Left            =   240
      TabIndex        =   0
      Top             =   600
      Width           =   3732
      _ExtentX        =   6588
      _ExtentY        =   556
      _Version        =   393216
      ListField       =   "nombres"
      BoundColumn     =   "codigo_empleado"
      Text            =   ""
      Object.DataMember      =   "Nombres_EmpleadosN"
   End
   Begin MSDataListLib.DataCombo cboTipoPlanilla 
      Bindings        =   "frmCambiarTipoEmpleado.frx":0B25
      Height          =   312
      Left            =   4080
      TabIndex        =   1
      Top             =   600
      Width           =   4332
      _ExtentX        =   7646
      _ExtentY        =   556
      _Version        =   393216
      Style           =   2
      BackColor       =   16777215
      ListField       =   "vDescripcion_TipoPlanilla"
      BoundColumn     =   "iCodigo_TipoPlanilla"
      Text            =   ""
      Object.DataMember      =   "plaCTipoPlanilla"
   End
   Begin VB.Label Label10 
      BackStyle       =   0  'Transparent
      Caption         =   "A la Planilla Donde sera cambiado"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000080&
      Height          =   252
      Left            =   4080
      TabIndex        =   4
      Top             =   360
      Width           =   3012
   End
   Begin VB.Label Label2 
      BackColor       =   &H00800000&
      BackStyle       =   0  'Transparent
      Caption         =   "Nombre del Empleado"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000080&
      Height          =   252
      Left            =   240
      TabIndex        =   3
      Top             =   360
      Width           =   2532
   End
End
Attribute VB_Name = "frmCambiarTipoEmpleado"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cboEmpleado_KeyDown(KeyCode As Integer, Shift As Integer)
HacerTab KeyCode
End Sub

Private Sub cboTipoPlanilla_KeyDown(KeyCode As Integer, Shift As Integer)
HacerTab KeyCode
End Sub

Private Sub CmdGuardar_Click()
        
    If cboEmpleado.Text = "" Or cboTipoPlanilla.Text = "" Then
        MsgBox "Los campos no pueden quedar vacios"
        Exit Sub
    End If


    If cboTipoPlanilla.BoundText <> 8 And cboTipoPlanilla.BoundText <> 9 And _
        cboTipoPlanilla.BoundText <> 10 And cboTipoPlanilla.BoundText <> 11 And cboTipoPlanilla.BoundText <> 23 And cboTipoPlanilla.BoundText <> 24 Then
        MsgBox "Este cambio de tipo de Planilla solo es para las planillas de venta.."
        Exit Sub
    End If


        If DE.rsCambiarTipoEmpleado.State = adStateOpen Then DE.rsCambiarTipoEmpleado.Close
        DE.CambiarTipoEmpleado cboEmpleado.BoundText, cboTipoPlanilla.BoundText

    MsgBox "Cambio Realizado."
    
End Sub


Private Sub CmdSalir_Click()
    Unload Me
End Sub

Private Sub Form_Load()
Me.Picture = LoadResPicture(104, 0)
    Left = Screen.Width / 2 - Width / 2
    Top = (Screen.Height / 2 - Height / 2) - 800

End Sub
